
<%@page contentType="text/html;charset=utf-8" pageEncoding="utf-8"%>
<%@page import="java.util.*"%>
<%@page import="com.yeren.jsp.tarena.dao.*"%>
<%@page import="com.yeren.jsp.tarena.entity.*"%>
<html>
<head>
<title>员工列表</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
	<div id="wrap">
		<div id="top_content">
			<div id="rightheader">
				<p>
					2009/11/20<br />
				</p>
			</div>
			<div id="topheader">
				<h1 id="title">
					<a herf="#">main</a>
				</h1>
			</div>
			<div id="navigation"></div>
		</div>
		<div id="content">
			<p id="whereami"></p>
			<h1>员工信息</h1>
			<table class="table">
				<tr class="table_header">
					<td>编号</td>
					<td>姓名</td>
					<td>薪水</td>
					<td>年龄</td>
					<td>操作</td>
				</tr>
				<%
					List<Employee> emps = (List<Employee>) request.getAttribute("emps");
					if(emps!=null){
					for (int i = 0; i < emps.size(); i++) {
						Employee emp = emps.get(i);
				%>
				<tr class="row<%=i % 2 + 1%>">
					<td><%=emp.getId()%></td>
					<td><%=emp.getName()%></td>
					<td><%=emp.getSalary()%></td>
					<td><%=emp.getAge()%></td>
					<td><a href="delete.do?id=<%=emp.getId()%>"
						onclick="return confirm('是否确认删除<%=emp.getName()%>信息？');">删除</a>
						&nbsp; <a href="load.do?id=<%=emp.getId()%>">修改</a>
					</td>
				</tr>
				<%
					}
					}else{
					%>
						员工列表没有任何记录！
					<%
				}
				%>
			</table>
			<p>
				<input type="button" class="button" value="增加员工"
					onclick="location='addEmp.jsp'" />
			</p>
		</div>
		<div id="footer">
			<div id="footer_bg">abc@126.com</div>
		</div>
	</div>
</body>
</html>